<?php $this->load->view('admin/public/head.html', array('js' => array(
    '/assets/library/ckplayer/ckplayer.js'
), 'css' => array(
    '/assets/admin/css/admin/common.css'
))); ?>
<script>
    var baseId = +'<?=$baseId?>';
    var pageType = '<?=!empty($pageType) ? $pageType : "add"?>';
</script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" ng-controller="admin-base-index">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            基地管理
            <small>添加基地信息</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/farm/base/index"><i class="fa fa-dashboard"></i> 基地管理</a></li>
            <li class="active">基地添加</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row adminBase">
            <div class="col-md-12">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">添加基地</h3>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal">
                        <div class="box-body">

                            <div class="form-group">
                                <label for="charger" class="col-sm-2 control-label">管理员邮箱<span class="text-red">*</span></label>
                                <div class="col-sm-4">
                                    <input type="email" class="form-control" ng-model="detail.email" id="email" placeholder="管理员后台登录账号">
                                    <p class="help-block">后台登录主邮箱账号</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="charger" class="col-sm-2 control-label">登录密码<span class="text-red">*</span></label>
                                <div class="col-sm-4">
                                    <input type="password" class="form-control" ng-model="detail.password" id="password" placeholder="后台登录密码">
                                </div>
                            </div>

                            <!--
                            <div class="form-group">
                                <label for="charger" class="col-sm-2 control-label">管理员昵称<span class="text-red">*</span></label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" ng-model="detail.nickname" id="nickname" placeholder="管理员姓名">
                                </div>
                            </div>
                            -->

                            <div class="form-group">
                                <label for="baseName" class="col-sm-2 control-label">基地名称<span class="text-red">*</span></label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" ng-model="detail.baseName" id="baseName" placeholder="基地名称">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">缩略图<span class="text-red">*</span></label>
                                <div class="col-sm-6">
                                    <div class="thumb-base-box">
                                        <img ng-show="thumbView" ng-src="{{ thumbView ? thumbView : '' }}" alt="">
                                    </div>
                                    <button class="btn btn-info" style="background: #00a65a; border: none;" id="uploadImage">选择图片</button>
                                    <p class="help-block">支持格式: PNG/JPG/GIF &nbsp;&nbsp;建议尺寸 640 * 360</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="h5-share" class="col-sm-2 control-label">H5视频地址</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" ng-model="detail.liveUrl" id="h5-share" placeholder="视频 H5 页面播放地址">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="charger" class="col-sm-2 control-label">负责人<span class="text-red">*</span></label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" ng-model="detail.charger" id="charger" placeholder="负责人">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="phone" class="col-sm-2 control-label">手机<span class="text-red">*</span></label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" id="phone" ng-model="detail.phone" placeholder="手机">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="telphone" class="col-sm-2 control-label">联系电话</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" ng-model="detail.telephone" id="telphone" placeholder="联系电话">
                                    <p class="help-block">区号与主体部分以 "-" 分隔</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="address" class="col-sm-2 control-label">基地地址<span class="text-red">*</span></label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" id="address" ng-model="detail.address" placeholder="基地地址">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">基地介绍<span class="text-red">*</span></label>
                                <div class="col-sm-8">
                                    <script id="container" name="content" type="text/plain"></script>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">幻灯片显示</label>
                                <div class="col-sm-5">
                                    <div class="checkbox">
                                        <label><input ng-model="detail.slider" type="checkbox"> 显示在客户端首页幻灯片位置</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <button type="submit" class="btn btn-default btn-sm" onclick="history.go(-1)">返回列表</button>
                            <button type="submit" class="btn btn-info btn-sm pull-right" style="background: #00a65a; border: none;" ng-click="saveBase()">确认修改</button>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->

    <div class="modal" id="videoModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">视屏预览{{ videoUrl }}</h4>
                </div>
                <div class="modal-body">
                    <div id="videoPlay" style="width: 100%; height: 350px;"></div>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
</div>
<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array('js' => array(
    'http://cdn.staticfile.org/webuploader/0.1.0/webuploader.withoutimage.min.js',
    '/assets/library/ueditor/ueditor.config.js',
    '/assets/library/ueditor/ueditor.all.min.js',
    '/assets/admin/js/base/edit.js'
))); ?>
